<template>
    <el-scrollbar style="height: 100vh;">
        <el-menu :default-active="sysStore.activeModuleName" @select="handleMenuSelect" unique-opened="true">
            <el-menu-item index="home">
                <el-icon><home-filled /></el-icon>
                <template #title>首页</template>
            </el-menu-item>
            <SubSideBar :menus="sysStore.modules"></SubSideBar>
        </el-menu>
    </el-scrollbar>

</template>

<script setup>
import { ref, computed, h } from 'vue'
import { useSysStore } from '@/stores/sys'
import SubSideBar from './subSideBar.vue';
let sysStore = useSysStore()
sysStore.loadPermissions()
const handleMenuSelect = (key, keyPath) => {
    // console.log(key, keyPath);
    sysStore.switchActiveModule(key)
}
</script>

<style scoped></style>
